#include<stdio.h>
const int maxn=10010;
int main()
{
	int a[maxn],n,sum1=0,sum2=0;
	double x,y;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		scanf("%d",&a[i]);
		if(a[i]>=85)
			sum1++;
		if(a[i]>=60)
			sum2++;
	}
	x=sum2*100.0/n;
	y=sum1*100.0/n;
	printf("%0.0lf%%\n%0.0lf%%",x,y);
	return 0;
}
